import {
  Get,
  Controller,
  Post,
  Response,
  Param,
  HttpStatus,
  Request,
  UseGuards,
  Body,
  UsePipes,
  Query,
  Put,
} from '@nestjs/common';
import { AdminService } from './admin.service';
import { Roles } from '../../auth/roles.decorator';
import { RolesGuard } from '../../auth/roles.guard';
import { Login } from './admin.dto';
// import {GetBillArrivalOneByIdDto} from './bill.dto';

@Controller('admin')
export class AdminController {
  constructor(private readonly adminService: AdminService) {}

  /**
   * @description: 管理员登入
   * @param {type}
   */
  @Post('/login')
  create(@Body() body: Login): Promise<object> {
    return this.adminService.login(body);
  }

  @Post('/userLogin')
  userLogin(@Body() body: Login): Promise<object> {
    return this.adminService.userLogin(body);
  }
}
